//
//  CHSMemoryTestController.m
//  ZXTimer_Example
//
//  Created by 朱新明 on 2023/5/26.
//  Copyright © 2023 simon. All rights reserved.
//

#import "CHSMemoryTestController.h"
#import <ZXUIImageUtils/ZXUIImageUtils.h>
#import <ZXTimer/ZXWeakProxy.h>

@interface CHSMemoryTestController ()
@property (nonatomic, strong) NSTimer *timer;

@end

@implementation CHSMemoryTestController


- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    ZXWeakProxy *proxy = [[ZXWeakProxy alloc] initWithTarget:self];
    
    self.timer = [NSTimer scheduledTimerWithTimeInterval:3.f target:proxy selector:@selector(timerAction:) userInfo:nil repeats:YES];
    UIImage *backgroundImage = [UIImage zx_gradientHorizontalDoubleColorImageWithSize:CGSizeMake(100, 30) startColor:[UIColor greenColor] endColor:[UIColor orangeColor]];
    
    [self performSelector:@selector(fooOneInput:second:) withObject:@"first" withObject:@"second"];
}

- (void)fooOneInput:(NSString *)obj1 second:(NSString *)obj2{
    
}

- (void)dealloc{
    [self.timer invalidate];
}

- (void)timerAction:(NSTimer *)timer{
    self.navigationItem.title = [NSString stringWithFormat:@"定时器"];
}



/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
